<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>

<%@ page import="com.msmall.base.util.ConstantDB" language="java"%>
<c:set var="AVALIABLE" value="<%=ConstantDB.AVALIABLE%>"></c:set>
<c:set var="UNAVALIABLE" value="<%=ConstantDB.UNAVALIABLE%>"></c:set>
<c:set var="QUESTION_TERMINAL_NO" value="<%=ConstantDB.QUESTION_TERMINAL_NO%>"></c:set>
<c:set var="QUESTION_TERMINAL_YES" value="<%=ConstantDB.QUESTION_TERMINAL_YES%>"></c:set>

<table cellspacing="0" cellpadding="0" border="0">
	<tr valign="middle" align="center">
		<th width="10%">分类</th>
		<th width="45%">标题</th>
		<th width="10%">关注/回答数</th>
		<th width="10%">状态</th>
		<th width="15%">提问时间</th>
	</tr>
<c:forEach var="question" items="${page.items}" varStatus="status">
	<c:choose>
		<c:when test="${question.enabled == AVALIABLE}">
		<tr valign="middle" align="center">
			<td>
				<a href="<c:url value='/question/list.do?segid=${question.type}'/>">
				<c:out value="${question.typeName}"/>
				</a>
			</td>
			<td>
				<a href="<c:url value='/question/view.do?questionid=${question.questionid}'/>">
					<c:out value="${question.content15}"/>
				</a>
			</td>
			<td><c:out value="${question.clickAmount}"/>/<c:out value="${question.answerAmount}"/></td>
			<td>
				<c:choose>
					<c:when test="${question.terminal == QUESTION_TERMINAL_YES}">
						<img src="${ctx}/images/i/right.jpg"></img>
					</c:when>
					<c:otherwise>
						<img src="${ctx}/images/i/close.jpg"></img>
					</c:otherwise>
				</c:choose>
			</td>
			<td><fmt:formatDate value="${question.createTime}" pattern="yyyy-MM-dd HH:SS"/></td>
		</tr>
		</c:when>
		<c:otherwise>
		</c:otherwise>
	</c:choose>
</c:forEach>
</table>
<div style="font-size:12pt;margin:10px 0 0 0;float:left;width:700px;">
	<c:set var="paginationSize" value="${fn:length(page.items)}"/>
	<c:if test="${page.pageIndex > 1}">
		<a href="javascript:ajaxQuestionListTabs('${page.pageIndex-1}');">
		上页
		</a>
	</c:if>
	<c:if test="${page.pageSize == paginationSize}">
		<a href="javascript:ajaxQuestionListTabs('${page.pageIndex+1}');">
		下页
		</a>
	</c:if>
</div>
		